Skip to content

pool_list: wire --json flag + stale-cache guard#5

Merged
dancinlife merged 6 commits into
mainfrom
feat/git-guard
May 17, 2026
Merged

pool_list: wire --json flag + stale-cache guard#5
dancinlife merged 6 commits into
mainfrom
feat/git-guard

Conversation

@dancinlife
Copy link
Copy Markdown
Contributor

Summary

wilson pool list improvements (+ branch carries 2 pre-existing agents-banner commits).

  • f01598c fix(pool-list-json)pool_list's schema advertised {"json":{"type":"boolean"}} and the CLI parsed pool list --json, but pool_invoke_list never read args.json — a dead param. Added a want_json branch to all four exit paths (cache-hit · malformed · empty roster · roster fallback).
  • 046718b feat(pool-list-stale-guard) — a cache older than 1h can have reachable silently lie (e.g. WireGuard mesh drops after the probe). Cache path now computes age_sec and flags stale; human output gains a ⚠ STALE cache line + age, --json gains stale+age_sec.
  • 8334932, 2cce1f4 — pre-existing agents-banner-sync / docs commits already on the branch.

Test

wilson build OK · wilson test 23/23 PASS. Stale branch verified with a forged-old probed_at (⚠ + stale:true); fresh cache → no warning. Test cache backed up/restored byte-identical.

🤖 Generated with Claude Code

ghost and others added 6 commits May 17, 2026 19:16
One-line @x wilson_pool entry below the @v spec — nudges Claude Code CLI
/ wilson sessions toward host-pool resource utilization for heavy work.
Mini-guide: ~/core/atlas/POOL.tape. Synced by wilson tools/pool-banner-sync.sh.
…ENTS.tape

Idempotent bash sweep — appends a one-line @x wilson_pool resource-
utilization pointer (→ ~/core/atlas/POOL.tape) right below the @v spec
entry of each ~/core/*/AGENTS.tape. Until wilson is the primary harness,
Claude Code CLI sessions read CLAUDE.md (→ AGENTS.tape) on project open;
this nudges every session toward host-pool resource utilization.

--commit flag commits each repo's AGENTS.tape in isolation
(git commit --only), guarded so a repo with pre-existing AGENTS.tape
changes is left as a working-tree edit, never swept into our commit.
Re-runnable when new repos appear.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@x wilson_pool / @x hexa_verify entries below the @v spec — nudge Claude
Code CLI / wilson sessions toward host-pool resource utilization and
verification-via-hexa-CLI for heavy / verification work. Mini-guides:
~/core/atlas/{POOL,VERIFY}.tape. Synced by wilson tools/agents-banner-sync.sh.
…er; add hexa_verify

Renamed tools/pool-banner-sync.sh → tools/agents-banner-sync.sh and
generalized from a single hardcoded entry to a BANNER_MARKERS /
BANNER_TEXT list — per-entry idempotent (a file keeps the entries it
already has; only missing ones are inserted). Banner now carries two
@x entries swept below the @v spec of every ~/core/*/AGENTS.tape:

  @x wilson_pool  → ~/core/atlas/POOL.tape   (host-pool resource use)
  @x hexa_verify  → ~/core/atlas/VERIFY.tape (verification via hexa CLI)

--commit guard generalized: commits only when the AGENTS.tape diff is
exactly our insertion (added == 4·entries-inserted, removed == 0) so a
repo with pre-existing AGENTS.tape edits is left as a working-tree edit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pool_list's schema advertised {"json":{"type":"boolean"}} and the CLI
layer parsed `pool list --json` into args.json=true, but pool_invoke_list
only ever read args.fresh — the json param was dead. Added a want_json
branch to all four exit paths (cache-hit · hosts.json malformed · empty
roster · roster fallback) emitting json_stringify of the host data.

wilson test 23/23 PASS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A cache older than 1h (or missing probed_at) can have `reachable`
silently lie — e.g. the WireGuard mesh goes down after the probe, so
`pool list` keeps reporting a dead host as reachable and consumers
route work to it.

pool_invoke_list's cache path now computes age_sec from probed_at vs
timestamp() and flags stale=true past the 1h threshold. Human output
gains a `⚠ STALE cache` warning line + `age` in the header; --json
gains `stale` + `age_sec` fields (and metadata.stale).

Verified: forged-old cache → ⚠ + stale:true; fresh cache → no warning.
wilson test 23/23 PASS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dancinlife dancinlife merged commit ccd3d0c into main May 17, 2026
0 of 2 checks passed
@dancinlife dancinlife deleted the feat/git-guard branch May 17, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant